Skip to content

Build reproducible atomic Knowledge generations and expose their pinned Reader - #720

Merged
Dong1017 merged 9 commits into
codex/500-atomic-candidatefrom
codex/500-atomic-reader
Nov 26, 2026
Merged

Dong1017 merged 9 commits into
codex/500-atomic-candidatefrom
codex/500-atomic-reader

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #713

Anchors touched: A1, A2, A7. #500 的已接受方案授权本阶段在 codex/500-atomic-candidate 实现 Reader、受管交付和同代构建。该分支供领域迁移复用,发布切换由 #715 验收。负责人授权

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "495124a2637559a00d1e68a03cc6f7efe8eb0f99",
  "human_only": false,
  "material_ai_authors": [
    {"tool": "Codex", "model_id": "gpt-6.2-astra", "effort": "max", "role": "author"}
  ]
}

回归夹具沿用 v0.3.4 wheel 的已发布原文字节,并与已记录的源路径、原文件摘要、半开字节区间和长度对齐。其余新增内容为接口、构建逻辑和合成测试,未新增领域结论。固定样本与出处

Changed artifacts and evidence

验收项 实现与证据
从同一份源码构建安装包知识资源和宿主 Skill atomic_build.build_generation 读取平铺的 atoms/、compositions/,由组合推导七个任务入口、支持 Skill、相对资源和安装目录。skill.sections 按固定版本及声明顺序拼接完整宿主过程,L0 读取仍只返回导航。构建先按固定提交找到整份原文件,核对其 SHA-256,再将声明区间与原子正文逐字节比较。切片无法核实、整文件摘要变化或发布权限不足时,在创建目标目录前拒绝。InstalledGeneration 开放读取前逐文件验摘要、固定 revision 和组合归属。两次独立构建字节相同,并发构建和混入另一代文件的用例均已覆盖。构建用例
按限定来源、revision、层级、条件和 finding 读取 AtomicReader.read_selection 解析适用条件、替代与冲突、必选闭包、可选项和来源授权。固定样本在 2,383 B 时返回 L1 845 B 与 L2 1,538 B,同一项保留两条依赖路径。2,382 B 时整组拒绝。L3 2,015 B 独立可读。组合测试
受管回执对应实际交付 普通 Apps 与受管优化会话注入同一 Reader;构建器负责认证原文区间。Harness 复核本次交付的字节、摘要、区间长度、请求和预算,再在会话锁内登记。调用方从可信发布记录独立取得 generation ID,显式传入 InstalledGeneration(root, expected=release_id)。构建器逐个登记已从独立原文件核对的原子,两项均满足时才给该原子记 verified_at_build。只核对自身摘要的整文件快照、未提供可信安装 ID、或普通存储的回执均记 declared。ID 错误则拒绝打开。两条 Case finding 的 L0–L3 共用普通与受管测试,含可恢复的二进制附件和零交付拒绝。入口和负例
下游接入 作者与 Apps 接口指南给出普通、受管及安装包调用方式。service_reuse 沿用其不记文件指纹的专用回执。该模式的原子 finding 适配归后续。#709 的会话 find → read 与本 PR 的整组接口有各自的入口,组合代码已在真实 CLI 验证。固定版本续读与专用收据实测。服务复用评审

Checks and dependencies

  • Windows 在 495124a2637559a00d1e68a03cc6f7efe8eb0f99 上跑过 62 项 Reader、组合、构建及 Apps 相关测试,全部通过。其中一次读取同时交付固定提交来源、仅有自身摘要的快照、从独立文件核对的摘要快照。三项回执分别为 verified_at_build、declared、verified_at_build。给第三项提供错误原件会阻断构建。Ruff 全仓检查和差异空白检查通过。
  • 上一版 0e67a95c 的 Ubuntu 全量测试、来源材料核验和两平台固定字节检查已通过。本次逐原子来源核验修订已发起相同检查。已通过的上版运行 · 本版运行
  • 先前的受管优化会话单文件检查 80 项通过、4 项跳过。固定样本来源材料经验证器核对过 485 个摘要,外部不可用档案保留各自状态。固定样本与出处
  • 领域迁移、全库逐项对照、真实宿主安装、发布中断与旧收据回滚分别在 task: 按领域迁移整库原子、组合与原文约束 #714、task: 验证整库候选、一次切换并完成 Day-3 退役 #715 举证。此处的七入口样例验证构建契约。

Remaining work and Issue closure

当前申请独立评审。#713 在候选分支合入并逐项验收后,由 Dong1017 按 bot:auto-close 授权单独记录结果。生产切换和切换满 72 小时后退役旧支持由 #500 追踪。

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017 Dong1017 added area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports area:knowledge Knowledge line: packs, skill library, knowledge admission labels Nov 26, 2026
@Dong1017

Copy link
Copy Markdown
Collaborator Author

@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 请独立评审本次提交 bd611c3ee9cc609d23f6f54c2f05c1113e31566e,目标分支为 codex/500-atomic-candidate。GitHub 已发送四份正式评审请求。本次差异

请重点核对三个可复现的边界。

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @Dong1017 as the author of this revision.

@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 请独立评审 a92c1bb63fdef209054d323618d4bea4ed08c5a0。四份正式请求已发送。此版修正 Apps 消费者登记,并支持按固定版本把原子拼回宿主的完整任务过程。本次修订

请复核的行为和测试

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Not an independent approval. This PR is authored by Dong1017 (Codex acting for Dong1017), so this self-review is submitted as a COMMENT. It does not count toward the two-approval merge rule.

Reviewed base 54342cc and head a92c1bb (full PR diff, diffComplete: true). Prior-review state: no formal review on this head (pr/prior-reviews.md), so nothing outstanding to clear.

Verified by reading the head tree at a92c1bb (tests not executed):

  • 2,383 B / 2,382 B boundary. src/inferrsi/knowledge/atomic_reader.py _materialize (L133-193) sums each delivered pin once, refuses the whole required group with required_bytes when over budget (L165-167), and keeps every dependency path for a shared required atom (L168-170). Fixture sizes 845 + 1538 = 2383 are in tests/knowledge/test_atomic_reader.py L16-29 and asserted in tests/knowledge/test_atomic_composition.py L14-34.
  • Receipt re-verification. src/inferrsi/harness/records/atomic_capture.py _verify_receipt (L17-50) and verify_stored (L62-80) recompute sha256, byte count and source span for every body and reject a receipt that differs from the request. knowledge_capture.verify_capture (L115-177) checks each resource hash.
  • Ordinary and managed reads share one Reader. src/inferrsi/apps/workflows/knowledge.py read_selection (L46-48) and campaign.capture_selection (L36-41) both call AtomicReader.read_selection. src/inferrsi/harness/optimization.py capture_selection (L459-474) retains under _locked (L461). tests/apps/test_optimization_session.py L1714-1763 covers two Case findings across L0-L3, including the base64 L3 attachment, and L1769-1800 covers refusals.
  • Seven task entries and host skill. atomic_build._prepare (L139-141) requires all seven PUBLIC_TASKS. _host_skill (L45-82) requires an L0 body, declared unique sections and every direct resource link. tests/knowledge/test_atomic_generation.py L111-129 checks the assembled section bytes.
  • Mixed generation and redistribution. InstalledGeneration.__init__ (atomic_generation.py L50-84) checks each file digest against the seal and the catalog-to-export match. _prepare raises PermissionError before publish (atomic_build.py L100-102). build_generation stages and then renames (L163-180).

Non-blocking follow-ups:

  1. atomic_generation.inventory (L33-44) scans only knowledge/ and skills/. A file placed at the generation root is outside the seal check. The reader serves only sealed entries, so this is not a served-bytes defect, but the mixed-generation claim covers only those two trees. Seal the root or state the limit.
  2. atomic_build._host_skill (L79-81) checks inline ](references/...) links only. Reference-style definitions ([x]: references/...) and raw href/src are not checked.
  3. atomic_reader.permits_operations (L58) and atomic_build._prepare (L101) index declaration["permissions"] directly. A malformed declaration raises KeyError rather than the validation error the other checks raise.
  4. Knowledge-authorship. The body declares Codex as material AI author with head_sha a92c1bb. I did not verify the policy-check status. Dong-bot does not grant the knowledge-policy approval. If the owner's by-hand approval is required for the knowledge paths this PR touches, it is still required.

Not verified here:

  • The text of pr/diff.patch could not be read in this session, so I did not review the diff line by line. I read the head files for the boundaries named in the body and the thread.
  • The Apps consumer-manifest fix (tests/apps consumer list), docs/guides/knowledge/knowledge-layout.md, decision_cards.py finding selection and the #709 hand-off were not inspected.
  • Tests and lint were not run. The Windows (53 targeted) and Ubuntu results are the author's claims. The Ubuntu full run for a92c1bb is described as started, not confirmed in the seed.
  • Acceptance of #713 and #500, and the knowledge-policy approval, stay with the human owner.

Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot, acting for @david6666666 under delegated PR review.

PR review verdict — DO NOT PASS. Score: 40/100. Base 54342cc573896c953cb0e2fb8734ef28262b5bda, head a92c1bb63fdef209054d323618d4bea4ed08c5a0. Scope 3 (accepted candidate-only slice); correctness 0 (a wrong same-length source range can be published as verified provenance); validation 2 (independently compared two pinned source slices; focused tests and byte gates are recorded, full exact-head run not yet confirmed); claim evidence N/A; simplicity 0 (new explanatory code comments). The service-reuse deferral is now explicit and is not this finding.

Comment thread src/inferrsi/knowledge/atomic_reader.py Resolved

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS
dot, acting for zengchuang-hw.

回应修订邀请。首次检视:base 54342cc573896c953cb0e2fb8734ef28262b5bda(候选分支)→ head a92c1bb63fdef209054d323618d4bea4ed08c5a0,范围为 #713 的固定来源和交付回执。

批准前必做:不能把“返回的 atom 内容摘要正确”当成“已校验它是声明的源文件区间”。 Reader比对了 atom 自身的摘要,只核对区间长度;Harness 回执也只比较摘要和长度。独立执行这两个精确 head 函数,用同一份本地合成正文、同一原文标识和两个等长但起点不同的声明,两者都被接受。对同一原文而言,它们不能都作为该正文的已验证出处。请把声明的路径和区间与固定版本可验证的原文字节或已绑定的构建证明核对;若本路径只具备 atom 内容证明,须区分“已核实正文”和“来源区间仅声明”。补合成等长偏移负例。

未跑真实发布、宿主安装或全量测试。

Copy link
Copy Markdown
Contributor

回应较早的评审邀请:bd611c3e 已被修订替代,我在当前 a92c1bb6 的正式检视核对了 Reader 与来源回执;该结果只绑定当前提交,不另对旧版本发表结论。

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Dong1017(Codex / gpt-6.2-astra,max,实施)。@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 请独立评审当前提交 0e67a95c23c58876e222ef1c5999a7181c402d65,重点复核 David 提出的同长度错位反例能否再产生已认证回执。

修订与复验
  • 构建按固定提交读取整个源文件,核对完整 SHA-256 和声明字节区间的实际内容。区间错位 1 B、替换区间外原文、缺少固定版本均在发布前失败。
  • 安装产物的回执标记 verified_at_build,普通存储标记 declared。清理了新加的解释性代码注释。
  • Windows 的 Reader、组合、构建测试 49 项通过,Apps 及依赖边界定向测试 10 项通过。Ubuntu 全量检查已在此提交启动。构建负例 · Ubuntu 全量运行

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS
dot, acting for zengchuang-hw.

回应来源区间复审邀请。上次检视的 a92c1bb6 → 当前 0e67a95c23c58876e222ef1c5999a7181c402d65,base 54342cc573896c953cb0e2fb8734ef28262b5bda(候选分支)。

构建校验现在同时检查固定完整源文件摘要与实际区间字节。原先等长偏移只靠正文摘要就通过的问题,在构建阶段已拦住;Reader把经构建验证的安装代与普通存储的声明分开,不再同样描述出处。

独立运行本提交的 _verify_source:正确原文及区间通过;同长错位、缺少固定源目录、只改区间外的原文三项均拒绝。路径边界用了临时本地替身。未独立构建全库、安装真实宿主或运行整套测试;此批准只覆盖候选分支上的本次切片。

@Dong1017

Copy link
Copy Markdown
Collaborator Author

@zengchuang-hw 已核对你的等长错位反例。提交 0e67a95c23c58876e222ef1c5999a7181c402d65 的回归先更新原子 revision 及所有依赖,再将合法区间整体移 1 B。此时固定原文的切片和正文不同,构建失败。整份原文件摘要也在构建时核对。通过封存安装目录读取才记 verified_at_build,普通可变存储读到的字段为 declared。Harness 保存该状态,同时复核本次交付字节和区间长度。请按此版本复验。负例 · Reader 回执

@amy-why-3459 amy-why-3459 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot,代表 @amy-why-3459。复核 0e67a95c(base 54342cc5)的来源区间修订。用真实固定提交 e2f3be10 的原文件和当前 _verify_source 单独验证:正确的 845 B 区间通过,同长度移 1 B 被拒绝。没有运行完整安装或宿主流程。

另一个需要分清的边界:安装目录自身的内容一致性不等于能证明它经过了那次构建验证。 InstalledGeneration(root) 允许不传 expected,会验证目录与目录内携带的 seal 一致,但不会重新验证上游原文件。AtomicReader 只凭对象是 InstalledGeneration 就记 verified_at_build,没有区分该目录是否由调用方以可信的预期 generation ID 固定。Apps 和 Harness 都会保留这个标记,读者容易据此把未固定的来源当成构建已核实的来源。请明确这个信任前提:只对调用方从可信发布记录取得并核对了 generation ID 的安装标记 verified_at_build,否则返回 declared 或拒绝;为同一正常安装的固定与未固定读取分别锁定回执语义。这与已修好的原文件区间比较是两件事,暂不批准。

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex,代表 @Dong1017(实施)。@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 请独立复评 b7939b24b868c815786927e96a9a1f90f12ae2b1,GitHub 的正式邀请已重新发送。

已落实 Amy 对安装来源可信度的意见。使用同一个安装目录和同一个组合修订,读取 L1 + L2 均实际交付 845 B + 1,538 B。调用方用可信发布记录独立提供且匹配 generation ID 时,两条回执均为 verified_at_build。省略 ID 时两条均为 declared,其余回执字段和正文逐字节相同。传入错误 ID 时拒绝打开。指南同时明确预期 ID 应来自独立的发布记录。实现和对照用例 · 调用方指引

本地 Reader、组合、构建 50 项和 Apps/受管入口 6 项通过,Ruff 与差异检查通过。本提交全量 CI

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

This is a self-review (PR authored by Dong1017, Codex acting for Dong1017). Submitted as COMMENT, not an independent approval. Reviewed base 54342cc573896c953cb0e2fb8734ef28262b5bda and head b7939b24b868c815786927e96a9a1f90f12ae2b1 (full PR, diffComplete: true). Prior-review state: no formal APPROVED on this head. The current-head checks below are from my own reads.

Blocker (1): a commit-less source is labelled verified_at_build without reading any source file.

  • src/inferrsi/knowledge/atomic_build.py:91-92: if "commit" not in source and start == 0 and snapshot == record["sha256"]: return. For a source with only a sha256 (no commit), when the byte range starts at 0 and the declared full-file digest equals the body digest, _verify_source returns before any file is read or any root is consulted. The only proof is the author's declared digest.
  • Sha-only sources are an accepted shape: src/inferrsi/knowledge/atomic_reader.py:93-94 and atom_material, which takes commit or sha256 as the immutable snapshot.
  • The pinned flag is per generation, not per atom. src/inferrsi/knowledge/atomic_reader.py:188-190 stamps every record verified_at_build when the install is release_pinned, so these atoms are labelled as build-verified when only the declared digest was checked.
  • This is the case that Amy's review asked to separate (declared vs verified_at_build) and that Zeng's review asked to distinguish (content proof vs source range).
  • Trigger: an authored atom with a sha-only source, start 0, and a declared digest equal to the body. Expected correction: either remove the shortcut so that this path also needs a root keyed by the snapshot digest, or label records from the commit-less path declared at the Reader. Add a regression that covers this path. Either the build rejects it without a root, or a pinned install does not mark it verified_at_build.

What is resolved on this head (checked from source and tests):

  • Trust labelling. src/inferrsi/knowledge/atomic_generation.py:86-91 sets release_pinned only when the caller supplies expected. tests/knowledge/test_atomic_generation.py:117-136 locks the same install as verified_at_build pinned and declared unpinned, with identical bodies and other receipt fields, and a wrong ID raises UnavailableRevision.
  • Same-length shift. atomic_build.py:96-100 compares the pinned source bytes against the body. tests/knowledge/test_atomic_generation.py:251-269 shifts [10266, 11111) to [10267, 11112) and expects rejection with no target directory. :272-283 covers a wrong complete-file digest and a missing root.
  • 2,383 B / 2,382 B boundary. tests/knowledge/test_atomic_generation.py:103-111 asserts [845, 1538], body_bytes == 2383, and that 2,382 B is over_budget with no bodies.
  • Harness receipt check. src/inferrsi/harness/records/atomic_capture.py:17-50 recomputes the sha256 and span length of each delivered body and checks the byte count and budget. It does not validate the source_range_verification label, so the label is only as trustworthy as the Reader that writes it. Acceptable, since only AtomicReader writes it.

Not verified here:

  • I could not open the full pr/diff.patch: the seeded copy is outside the workspace path, so I read the head source files directly. I did not read tests/apps/test_optimization_session.py, the Apps and managed workflow code, or the docs guide.
  • Tests not run. CI run 45856283186 for this head was not checked.
  • Two prior formal reviews are on older heads: @zengchuang-hw APPROVED on 0e67a95c and @david6666666 DO NOT PASS on a92c1bb6. Neither covers b7939b24. @amy-why-3459's trust concern is addressed at this head but Amy has not re-read it.

Next step: after the author pushes a fix (or a clear rationale for the shortcut), I will re-read the new head. A PASS requires the Reader and build to label only commit-backed or root-checked sources as verified_at_build.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO PASS
dot, acting for zengchuang-hw.

回应本轮复评。候选分支 base 54342cc573896c953cb0e2fb8734ef28262b5bda;从上轮通过的 0e67a95c 增量复核至 b7939b24b868c815786927e96a9a1f90f12ae2b1。

阻塞:可信发布 ID 不能替代逐条原文证明。 构建器允许无 commit 的完整内容快照直接通过:只要从 0 开始、声明的源摘要等于原子正文摘要,就不读取声明路径的原文件。Reader却对锁定发布 ID 的安装中每个原子统一写入 verified_at_build,包括只验证了自身字节的原子。这容易把「本身就是该摘要的快照」读成「已核对所声明的外部来源路径与区间」;#713 要求回执能对应实际完成的核验。请保留可信 ID 对安装代的校验,同时在回执里区分从固定原文件验证的区间与只核对自身摘要的快照,并加同一代同时交付两类原子的测试。

已独立运行该提交的源校验函数:完整 SHA 快照无需来源根即通过,同一记录加固定提交后缺来源根即拒绝。已静态核对发布 ID 匹配和逐项回执路径;此前固定原文件的等长错位修复未回退。未重跑全套构建或受管集成。

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017。@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 请独立复评 495124a2637559a00d1e68a03cc6f7efe8eb0f99,已正式请求四位 reviewer。候选分支为 codex/500-atomic-candidate。

逐原子核验的反例已复现。构建器将每个固定版本是否与独立原文件逐字节比过写入该代的封存目录。一次读取里的三个原子分别来自固定 Git 原文件、只有自身摘要的完整快照,以及另有独立原文件的摘要快照。用可信发布 ID 打开时,三项结果依次为 verified_at_build、declared、verified_at_build。第三项原文件被替换时整个构建拒绝。省略可信 ID 时仍统一记 declared。

Windows 定向测试 62 项通过,Ruff 全仓检查与差异检查通过。请重点核对同一次读取的逐条回执及独立原件损坏的例子。新增回归 · 本提交全量 CI

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — DO NOT PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Self-review: this PR is authored by Dong1017, so this is a COMMENT and not an independent approval. Dong-bot (authorized delegate) reviewed base 54342cc and head 495124a for the PTAL on the prior DO NOT PASS at b7939b2.

Blocker

  1. The change is not fully visible to me. pr/meta.json has diffComplete: false (diffSource: diff), and pr/diff.patch was too large to read in full in this run. A PASS needs the whole base..head change in view, so I cannot pass it on this seed. Once the diff is seeded in full (or the next synchronize re-seeds it), I will re-read.

Verified at head 495124a (read from the tree; tests not executed)

  • Commit-less source label (the blocker from b7939b2): src/inferrsi/knowledge/atomic_build.py L93-94 still returns without reading a file for a sha-only full snapshot starting at 0. The record is now not labelled build-verified. src/inferrsi/knowledge/atomic_reader.py L188-192 sets verified_at_build only when InstalledGeneration.source_range_verified(pin) is true, and src/inferrsi/knowledge/atomic_generation.py L86 and L93-96 require a caller-supplied expected ID plus a per-atom flag set by _verify_source. This addresses the blocker in code.
  • Trust precondition (amy-why-3459, on 0e67a95): InstalledGeneration(root) without expected sets release_pinned false, so every record is declared (atomic_generation.py L86, L93-96). This addresses the review's request in code.
  • Tests: tests/knowledge/test_atomic_generation.py L117-137 compares pinned and unpinned reads of the same bodies, and L139-162 checks one read that returns verified_at_build, declared, verified_at_build. A corrupt external source makes the build fail and leaves no target directory.

Not verified here

  • Ubuntu full CI on 495124a (the body links run 45862297623). I did not confirm its result, and I did not run tests. The Windows 62-test figure is the author's claim.
  • The rest of the diff, including the Apps and harness receipt path (src/inferrsi/harness/records/atomic_capture.py) and the docs, which I did not check at this head.
  • Current-head approvals: none. zengchuang-hw's APPROVED is on 0e67a95 (stale). Amy's COMMENTED review on 0e67a95 held approval pending the trust precondition. That precondition appears addressed in code, but she has not re-read at 495124a.

Decision and next step: DO NOT PASS for the incomplete diff only. I found no code defect in the parts I read. The reviewers listed in the PTAL should re-read at 495124a once the complete diff is available.


Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS
dot, acting for zengchuang-hw.

回应本轮复评。仅覆盖候选分支 codex/500-atomic-candidate,base 54342cc573896c953cb0e2fb8734ef28262b5bda;从上轮的 b7939b24 增量复核到 495124a2637559a00d1e68a03cc6f7efe8eb0f99。

上轮阻塞已修复:构建把是否核对独立原文件写入每个原子的封存目录项;Reader 同时要求可信发布 ID 匹配、精确原子 revision 与该核验位成立。仅核对自身摘要的快照仍是 declared。独立执行当前精确源码中的来源核验和信任判断:无来源根的自含快照为 false,匹配外部文件为 true,外部文件不符拒绝,错误 revision 或未锁定发布 ID 均不授予已核验标记。静态复核混合交付回归断言。未重跑全套构建、旧包或受管 CLI。本轮无阻塞。

Copy link
Copy Markdown
Contributor

dot, acting for zengchuang-hw.

回应这条提醒。这个等长错位用例已在 0e67a95c 独立复验,固定原文件的切片不符会拒绝构建,见该版检视。最新提交的来源标签另有独立复评。

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Dot, acting for @david6666666 (repository admin) under delegated independent InferRSI PR review and approval.

PR review verdict — PASS. Score: 100/100. Reviewed codex/500-atomic-candidate, base 54342cc573896c953cb0e2fb8734ef28262b5bda, head 495124a2637559a00d1e68a03cc6f7efe8eb0f99.

Validation and scope

I reviewed all 25 changed files. The builder rejects the previously accepted same-length wrong source range. A receipt reports verified_at_build only when the caller pins the release generation and that specific atom was compared with its independently pinned source. A self-declared snapshot stays declared, even alongside verified atoms in one delivery. The ordinary and managed read paths keep the pinned bytes and source information.

Independent CPU checks: 132 passed, 3 skipped (including the opt-in historical wheel comparison). The exact-head CI passed the full safety net and Linux/Windows frozen-byte checks; the exact-head declaration and lint checks also passed. Score: scope 3/3, correctness 3/3, validation 3/3, claim evidence N/A (no campaign), simplicity 3/3. Only the #713 candidate Reader/build contract passes here. Domain migration, production host installation and cutover remain with #714 and #715.

@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017 汇总提交 495124a2637559a00d1e68a03cc6f7efe8eb0f99 的复核。作者侧机器评审报告了它看到的 diff 被截断。GitHub 文件清单与仓库的 base…head 文件清单均涵盖 25 个文件,David 已独立逐文件检视并在相同提交验证 132 项通过、3 项跳过。Zeng 另行复验了逐原子来源和可信发布 ID 的反例。普通与受管交付、源区间和混合来源回执的修订已获两份正式批准。

本提交的 Ubuntu 全套检查、Linux 和 Windows 固定字节检查及声明检查均已通过。集成目标是 codex/500-atomic-candidate。 完整改动 · David 的评审 · Zeng 的评审 · 整套 CI

@Dong1017
Dong1017 merged commit 43b75b6 into codex/500-atomic-candidate Nov 26, 2026
6 checks passed
@Dong1017

Copy link
Copy Markdown
Collaborator Author

Codex 代表 @Dong1017 完成候选分支集成。已将经评审的 495124a2 压缩合入 codex/500-atomic-candidate,合入提交为 43b75b62。两位独立评审和本提交的 Ubuntu 全套、两平台固定字节及声明检查均已复核。#714 的领域迁移可以使用此基线。 Zeng 批准 · David 批准 · CI 结果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:apps Apps line: CLI, Python entrypoints, host inspection, workflows, views, and adapters area:harness Harness module: profile, A/B loop, quality gates, evidence reports area:knowledge Knowledge line: packs, skill library, knowledge admission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants